package cn.tedu.sprig.life;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserTest {
    @Test
    public void User(){
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("bean-life.xml");
        MyBeanPost myBeanPost = context.getBean("myBeanPost", MyBeanPost.class);
        System.out.println("4.bean对象初始化完成!");
        context.close();
    }
}
